<!DOCTYPE html>
<html>

<head>
<title>类别类型</title>
<meta http-equiv="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit">
<%include("/common/include.html"){}%>
</head>

<body class="easyui-layout">
	<div data-options="region:'center',fit:false,border:false,split:false">
		<div id="contentLayout" class="easyui-layout" data-options="fit:true">
			<div id="table_div" data-options="region:'center',border: false">
				<table id="productTable" style="height: 100%">

				</table>

				<div id="tb" style="height: auto">
				<input type="hidden" id = "organIds" value="${organIds! }" />
					产品名称: <select  id = "productIds" class="easyui-combobox theme-textbox-radius" style="width: 110px;height:25px;text-align: center;" >
						 <option value ="95e2ae17462e4d0eb1dc84bc63bc478a">本草焕能紧肤精油</option>
						 <option value ="daaba791f4104ae98504a1bc421e0d8d">本草焕能紧肤膏</option>
				
				</select>
<!-- 					<a href="#" onclick='searchProduct()' class="easyui-linkbutton" iconCls="icon-search">搜索</a> -->					
					<a href="#" onclick='addProduct()' class="easyui-linkbutton" iconCls="icon-add">添加</a>					
					<a href="#" class="easyui-linkbutton" iconCls="icon-edit" onclick="editProduct()">修改</a>
					<a href="#" class="easyui-linkbutton" iconCls="icon-remove" onclick="deleteProduct()">删除</a>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	/* function searchProduct(){
		var typeIds = $("#typeIds").val();
		var parm = {"_query.typeIds": typeIds};
		$("#productTable").datagrid('load', parm);
	} */
	function addProduct(){
		var productIds = $("#productIds").val();
		if(productIds == -1){
			 $.slideMsg("请选择要添加的产品！", parent.$);
		}else{
			loadDialog($("#productTable"), null, '添加产品', 'productOrgExperience/toAddProduct?productIds=' + productIds);
		}
	}
	function editProduct(){
		 var row = $("#productTable").datagrid('getSelected');
		 if(row == null){
			 $.slideMsg("请选中一条记录！", parent.$);
		 }else{
			 loadDialog($("#productTable"), null, '编辑产品', 'productOrgExperience/toUpProduct?ids=' + row.ids);
		 }
	}
	function deleteProduct(){
		 var row = $("#productTable").datagrid('getSelected');
		 if(row == null){
			 $.slideMsg("请选中一条记录！", parent.$);
		 }else{
			 var rowids = row.ids
			 
			 parent.$.messager.confirm('删除','确定删除？',function(r){
				if (r){
					$.post("productOrgExperience/productListstruts",{"ids":rowids},function(result){
						$('#productTable').datagrid('reload');
					});
				}
			 });
		 }
	}
	$(function() {
		$('#productTable').datagrid({
			cls: "theme-datagrid",
			toolbar: '#tb',
			singleSelect: true,
			rownumbers: true, //显示序号
			pagination: true,
			
			pageSize: 10,
			fitColumns:true,
			url: "productOrgExperience/productList",
			queryParams: {
				'_query.organIds': $("#organIds").val()
			},
		    method: 'post',
			collapsible: true,
			columns:[[
				  		{field:'ids',title:'ids',width:100,align:'center', hidden:true},
				  		
				  		{field:'name',title:'名称',width:150, align:'center'},
				  		{field:'totalexperience',title:'总次数',width:50, align:'center'},
				  		{field:'ybexperience',title:'腰部次数',width:50, align:'center'},
				  		{field:'gbexperience',title:'胳膊次数',width:50, align:'center'},
				  		{field:'dtexperience',title:'大腿次数',width:50, align:'center'},
				  		{field:'xtexperience',title:'小腿次数',width:50, align:'center'},
				  		{field:'bbexperience',title:'背部次数',width:50, align:'center'},
				  		{field:'kbexperience',title:'胯部次数',width:50, align:'center'},
				  		{field:'frexperience',title:'副乳次数',width:50, align:'center'}
				  	
// 				  	
				      ]],
			onLoadSuccess:function(){
				
			}
		});
		
	})
	</script>

</body>